﻿@model StudentInfo.Areas.StudentArea.ViewModels.MarkEditViewModel

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Редактирование</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Оценка</legend>

        @Html.HiddenFor(model => model.Id)

        <div class="editor-label">
            @Html.LabelFor(model => model.StudentId)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.StudentId, 
            Model.StudentList, "Выберите студента")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.ExamId)
        </div>
        <div class="editor-field">
             @Html.DropDownListFor(model => model.ExamId, Model.ExamList, "Выберите экзамен")
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Result)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Result)
            @Html.ValidationMessageFor(model => model.Result)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Назад к списку", "Index")
</div>


